<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="video">
        <button class="vBg">
            <img src="assets/images/logo.png"></img>
            <div class="vStart" id="start">
                <img src="assets/images/scroll_img_01.jpg"></img>
            </div>
        </button>

    </div>
    <div class="mask">
        <div class="show">
            <button class="close">
                <img src="assets/images/close.svg" />
                <!-- <i class="bi bi-x-square"></i> -->
                <!-- <span class="iconfont icon-guanbi"></span> -->
            </button>

            <video controls class="pArea">
                <source src="assets/video/云记介绍.mp4" type="video/mp4">
                </source>
            </video>

        </div>
    </div>
</body>
<style>
    .video {
        padding-left: 2em;
        float: right;
        width: 50%;
    }

    .video .vBg {
        position: relative;
        display: inline-block;
        cursor: pointer;
        border: 0;
        box-shadow: 0 1px 6px 0 rgba(95, 125, 252, 50);
    }

    .video .vStart {
        position: absolute;
        right: 1.7em;
        bottom: 1.5em;
        width: 40px;
        height: 40px;
        cursor: pointer;
    }

    .video .vStart:hover {
        position: absolute;
        right: 1.6em;
        bottom: 1.3em;
        width: 43px;
        height: 43px;
    }

    .mask {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 100;
        display: none;
    }

    .mask .show {
        width: 900px;
        height: 500px;
        border: 0;
        position: relative;
    }

    .mask .show :focus {
        outline: none;
    }

    .mask .show :hover {
        outline: none;
    }

    .mask .show video {
        width: 100%;
        height: 100%;
        z-index: 100;
        /* float: left; */
        background-color: #000;
    }

    .mask .show .close {
        background-color: rgba(0, 0, 0, 0);
        border: 0;
        cursor: pointer;
    }

    .mask .show .close img {
        width: 36px;
        height: 36px;
    }

    .mask .show .pArea {
        float: left;
        width: calc(100% - 36px - 1em);
        margin-top: 36px;
    }
</style>
<script>
    setTimeout(() => {
        //这个是点击背景图片播放视频
        document.getElementsByClassName("vBg")[0].onclick = () => {
            console.log("22222");
            var maskBlock = document.getElementsByClassName("mask")[0];
            maskBlock.style.display = "flex";
        }

        //这个是点击x关闭按钮
        document.getElementsByClassName("close")[0].onclick = () => {
            console.log("22222");
            var maskBlock = document.getElementsByClassName("mask")[0];
            maskBlock.style.display = "none";
        }

    }, 100)
</script>

</html>